-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: break the functor Run into Run and TryWith #97
Conversation
59d622a
to
a098ca0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks fine, but I'd like to better understand something. In Discord you mentioned that it doesn't make conceptual sense for these two to be part of the same module functor --- but in the documentation I think I see that the intended use-case is that you will use try_with
to tweak some effects within the dynamic scope of a call to run
. So it sounds like these do go hand-in-hand, though I understand that maybe Run
is not the best name for the functor.
I'm ok with separating them, but I just wanted to better understand the choice.
It is very subtle. When we are writing the code let module R = S.Run (H) in
R.run f (* <-- this line *) the function |
Now i understand! thank you |
Now I see how silly my question was! Thanks for answering it anyway 😆 |
This is a breaking change!
This is an alternative to the PR #96 without using first-class modules. It is practically backward-compatible because none of our new proof assistants have implemented the (planned) features that will need
try_with
yet (and I believe we are still the only users of this otherwise super cool library).The documentation of
try_with
has been rewritten, though the wording is still a bit awkward.